package com.aclyyx.mi.display.server;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.TimerTask;

public class SocketCheckTask extends TimerTask {

	private Connect conn;
	private BufferedReader in;
	
	public SocketCheckTask(Connect conn, BufferedReader in) {
		this.conn = conn;
		this.in = in;
	}
	
	@Override
	public void run() {
		try {
			String line = in.readLine();
			if (Connect.TIMEOUT_MSG.equals(line)) {
				conn.checkTime = System.currentTimeMillis();
			}
		} catch (IOException e) {
		}
	}

}
